export const getVideoStream = (
  deviceId: string,
  width?: number,
  height?: number
) => {
  return new Promise((resolve, reject) => {
    navigator.mediaDevices
      .getUserMedia({
        video: { deviceId, width, height },
      })
      .then((stream) => {
        resolve(stream);
      })
      .catch((error) => {
        reject(error);
      });
  });
};
